package org.ace.service;

import org.ace.dao.PersonDao;
import org.ace.model.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 *
 * Created by SunQiPeng on 2016/6/16.
 */
@Service
@Transactional
public class PersonService {
    @Autowired
    private PersonDao personDao;

    public void testTransactional(){
        Person person = new Person();
        person.setName("ace");
        person.setPassword("frameword");
        personDao.save(person);

        System.out.println(person);

        int i = 1/0;

    }
}
